<template>
  <el-menu
    :default-active="$route.path"
    class="el-menu-vertical-demo"
    :collapse="isCollapse"
    :unique-opened="true"
  >
    <menu-item :menuList="menuList"></menu-item>
  </el-menu>
</template>

<script>

import MenuItem from './MenuItem.vue';
import { mapState } from 'vuex';
export default {
  components: {MenuItem},
  computed:{
    ...mapState({
      isCollapse : state => state.MenuStroe.isCollapse,
      //菜单数据
      menuList: state=>state.MenuStroe.menuList
    })
  },
  data() {
    return {
      
    };
  },
};
</script>

<style lang="scss" scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
.el-menu{
  border: none;
}
</style>